package gui.custom;


import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.event.MouseEvent;

import loaders.ThemeViewer;

import actions.GetDetailedTheme;
import backend.rss.items.ThemeItem;

public class SwatchPanel extends AbstractSwatchPanel
{
	private ClickableLabel titleLabel;
	private GetDetailedTheme action;
	
	public SwatchPanel(ClickableLabel titleLabel, ThemeItem item, Dimension swatchSize, GetDetailedTheme action)
	{
		super(item, swatchSize);
		this.titleLabel = titleLabel;
		this.action	= action;
	}
	
	public void mouseClicked(MouseEvent e)
	{
		if (e.getButton() == MouseEvent.BUTTON1)
		{
			action.actionPerformed(null);
			//viewer.showThemeDetails(getThemeItem());
		}
		
	}

	public void mouseEntered(MouseEvent arg0)
	{
		titleLabel.swapColour(true);
		super.mouseEntered(arg0);
	}

	public void mouseExited(MouseEvent arg0)
	{
		titleLabel.swapColour(false);
		super.mouseExited(arg0);
	}	
}
